<template>
  <div>
    <view-grid ref="grid" :columns="columns" :detail="detail" :editFormFields="editFormFields"
      :editFormFileds="editFormFields" :editFormOptions="editFormOptions"
      :searchFormFields="searchFormFields" :searchFormFileds="searchFormFields"
      :searchFormOptions="searchFormOptions" :table="table" :extend="extend">
    </view-grid>
  </div>
</template>
  
<script>
import extend from "@/extension/mall/summaryReceipts.js";
import ViewGrid from "@/components/basic/ViewGrid.vue";
var vueParam = {
  components: {
    ViewGrid,
  },
  data() {
    return {
      table: {
        key: "id",
        footer: "Foots",
        cnName: "收款汇总表",
        name: "summaryReceipts",
        url: "/Small_v_shop/",
        sortName: "id",
        paginationSize: 99999999,
        paginationHide: true,
      },
      extend: extend,
      editFormFields: {},
      editFormOptions: [],
      searchFormFields: {
        title: "",
        status: "",
        distributorCode: "",
        createDate: "",
        supplierCode: "",
        type: "",
        takeTime: "",
      },
      searchFormOptions: [
        [
          { title: "商品名称", field: "title", type: "like" },
          { title: "项目名称", field: "title", type: "like" },
        ],
        [
          {
            dataKey: "distributorList",
            data: [],
            title: "分销商名称",
            field: "distributorCode",
            type: "select",
          },
          { title: "创建时间", field: "createDate", type: "datetime" },
        ],
        [
          { title: "游玩时间", field: "playStartDate", type: "datetime" },
          { title: "票状态时间", field: "takeTime", type: "datetime" },
        ],
        [
          {
            dataKey: "mall_supplier",
            data: [],
            title: "供应商名称",
            field: "supplierCode",
            type: "select",
          },
          {
            dataKey: "order_shop",
            data: [],
            title: "票状态",
            field: "status",
            type: "select",
          },
        ],
      ],
      columns: [
        {
          field: "id",
          title: "主键",
          type: "string",
          width: 90,
          hidden: true,
          require: true,
          align: "left",
        },
        {
          field: "title",
          title: "商品名称",
          type: "string",
          width: 220,
          align: "left",
          sortable: true,
        },
        {
          field: "title",
          title: "项目名称",
          type: "string",
          width: 220,
          align: "left",
        },
        {
          field: "settlement_price",
          title: "单价",
          type: "decimal",
          width: 90,
          align: "left",
        },
        {
          field: "num",
          title: "购买数量",
          type: "decimal",
          width: 90,
          align: "left",
          summary: true
        },
        {
          field: "settlement_total_fee",
          title: "合计金额",
          type: "decimal",
          width: 150,
          align: "left",
          summary: true
        },
        {
          field: "status",
          title: "票状态",
          type: "int",
          bind: { key: "order_shop", data: [] },
          width: 90,
          align: "left",
        },
        {
          field: "type",
          title: "产品类型",
          type: "string",
          width: 120,
          require: true,
          align: "left",
          show: true,
        },
        // { field: 'supplierName',
        //   title: '供应商名称',
        //   type: 'string',
        //   width: 120,
        //   align: 'left'
        // },
        // {
        //   field: "payMoney",
        //   title: "金额",
        //   type: "decimal",
        //   width: 60,
        //   align: "left",
        // },
        {
          field: "oStatus",
          title: "支付状态",
          type: "string",
          bind: { key: "receip_details", data: [] },
          sort: true,
          width: 110,
          align: "left",
        },
        {
          field: "supplierCode",
          title: "供应商名称",
          type: "string",
          bind: { key: "mall_supplier", data: [] },
          width: 120,
          align: "left",
        },
        {
          field: "distributorCode",
          title: "分销商名称",
          type: "string",
          bind: { key: "distributorList", data: [] },
          width: 120,
          align: "left",
        },
        {
          field: "createDate",
          title: "创建时间",
          type: "datetime",
          width: 120,
          hidden: true,
          align: "left",
          sortable: true,
        },
      ],
      detail: {
        cnName: "#detailCnName",
        columns: [],
        sortName: "",
        key: "",
      },
    };
  },
};
export default vueParam;
</script>
  